﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Configuration;

/// <summary>
/// Summary description for D_UserPassword
/// </summary>
namespace Bestlife.ERP.DataAccess
{
    public class D_UserPassword
    {
        public D_UserPassword()
        {
            //
            // TODO: Add constructor logic here
            //
        }
        public static int addUserPassword(Bestlife.ERP.Entities.E_Registration reg)
        {
            SqlConnection conn_new = new SqlConnection();
            int status = 0;
            try
            {
                String connStr = ConfigurationManager.ConnectionStrings["MainConnStr"].ConnectionString;
                Bestlife.ERP.DataAccess.clsCon.connect(connStr);

                String Ssql = "INSERT INTO Tbl_User(Use_ID,Use_Name,User_Create,User_Group,User_APIN,Date_Create,Last_Modify,Pas_Word)VALUES('" + reg.Dis_Id1 + "','" + reg.UserName1 + "','" + reg.Giv_Name1 + "','"+reg.Team1+"','"+reg.APIN1+"','" + DateTime.Now + "','" + DateTime.Now + "','" + reg.Pas_Word1 + "')";
                Boolean exec = Bestlife.ERP.DataAccess.clsCon.AddEditDel(Ssql);
            }
            catch (Exception)
            {
                // Console.WriteLine(exx);
            }
            return status;
        }
    }
}